package com.dnjn.happiness.emo.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dnjn.happiness.emo.api.model.EmoUserBean;
import com.dnjn.happiness.emo.domain.User;
import com.dnjn.happiness.system.api.domain.UserSituationVO;

import java.util.HashMap;
import java.util.List;

/**
 * 家庭记录Service接口
 * 
 * @author happiness
 * @date 2023-10-13
 */
public interface IUserService  extends IService<User>
{
    /**
     * 除了新增新用户之外，其余影响快乐值的都应该走这里，因为里边有个监听快乐值是否需要沟通 逻辑
     * @param userId
     * @param addScore
     * @return
     */
    Boolean updateHappinessScores(Long userId,Integer addScore);

    void emptytheHappyBeans(Long userId);

    void emptytheHappyBeansToday(Long userId);

    User saveEmoUser(Long userId);

    List<User> selectUserList();

    List<EmoUserBean> selectByLimit(int index, int num);

    Integer selectRequiredCommunicateCount(Integer startInterval, Integer endInterval, int criticalValue,Long deptId);

    Integer selectnormalCount(Integer startInterval, Integer endInterval, int criticalValue,Long deptId);

    Page<UserSituationVO> getHomePage(Page page, HashMap<String, Object> map);

    Integer selectDelayDaysByUserId(Long userId);


    boolean updateWorkDate(Long userId);

    void updateEmoUserBeansToZero();

}
